Constantly "Downloading M of N in All Mail" or Inbox messages from Gmail IMAP account, slows system from redownloading message headers
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
People
(Reporter: bdevine, Unassigned)
References
(Blocks 3 open bugs, )
Details
(Keywords: perf, regression, Whiteboard: [gs][regression:TB18 bug 721316])
User Story
https://support.mozilla.org/en-US/questions/1040391 https://support.mozilla.org/en-US/questions/1079013 https://support.mozilla.org/en-US/questions/1117013 https://support.mozilla.org/en-US/questions/1203956 https://support.mozilla.org/en-US/questions/1205939 https://support.mozilla.org/en-US/questions/1217321 (5/16/2018 claims beta resolved issue) https://support.mozilla.org/en-US/questions/1242826 https://support.mozilla.org/en-US/questions/1243371 https://www.reddit.com/r/Thunderbird/comments/9259gh/whats_happening_very_slowdownloading_x_of_xxxxxx/
Attachments
(2 files)
Updated•12 years ago
|
Updated•12 years ago
|
Updated•12 years ago
|
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Updated•12 years ago
|
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Comment 12•12 years ago
|
||
Comment 13•12 years ago
|
||
Comment 14•12 years ago
|
||
Comment 15•12 years ago
|
||
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
Comment 19•12 years ago
|
||
Comment 20•12 years ago
|
||
Comment 21•12 years ago
|
||
Comment 22•12 years ago
|
||
Comment 23•12 years ago
|
||
Comment 24•12 years ago
|
||
workaround |
Comment 25•12 years ago
|
||
Comment 26•12 years ago
|
||
Comment 27•12 years ago
|
||
Comment 28•12 years ago
|
||
Comment 29•12 years ago
|
||
Comment 31•12 years ago
|
||
Comment 32•12 years ago
|
||
Comment 33•12 years ago
|
||
Comment 34•12 years ago
|
||
Comment 35•11 years ago
|
||
Comment 36•11 years ago
|
||
Updated•11 years ago
|
Comment 38•10 years ago
|
||
Comment 39•10 years ago
|
||
Comment 40•10 years ago
|
||
Comment 41•9 years ago
|
||
Comment 42•9 years ago
|
||
Comment 43•9 years ago
|
||
Comment 44•9 years ago
|
||
Comment 45•8 years ago
|
||
Comment 46•8 years ago
|
||
Comment 47•7 years ago
|
||
Comment 48•7 years ago
|
||
Updated•6 years ago
|
Comment 51•6 years ago
|
||
datapoint - The last time this happened, but in a big way, was the horrible version 16 regression Bug 806760 - TB16 Redownloads messages / Constantly bringing folders "up to date" / horrible IMAP performance - which of course was fixed in version 17.0 and version 16 was canned.
Comment 52•6 years ago
|
||
I've seen situations where you get folder(s) re-downloaded on startup that shouldn't need updating. However, I was abusing the system for test purposes. You end up with multiple storage files file-1, file-2, file-3 etc each time a new download update occurs. I believe tb thinks the folder has been deleted and a new one if present so it re-fetches headers and/or message bodies. I've only seen this when folder names contain unusual character such as slash.
Comment 53•5 years ago
|
||
Now this I think is odd.
The activity manager advised for probably 15 minutes that it was bringing the all mail folder up to date and downloading 1 or 131,000 odd messages. Harddisk activity could be heard grinding away
Then it decided it was up to date and reported one message downloaded. This was despite the all mail folder having some 161,000 messages per the status bar.
There is something wrong in processing of GMail IMAP.
Comment 55•5 years ago
|
||
Still occasionally happens to me, randomly. It also forces global reindex of the file - so there is a double performance hit.
Comment 56•5 years ago
|
||
I eventually solved my problem, reported in my 2 messages 2 years ago.
I found out that the constant re-downloading of the 3 affected folders was due to something wrong (some invalid character?) in one of the emails the folder contained.
Doing some try and fail experiments (based on the index of the last processed email before TB started re-downloading, which only gives an approximation), I was able to identify the "bad" email, and after deleting it server side using my mail provider's webmail, ... I was done, no more re-downloading ever since.
Unfortunately, I was unable to identify what was wrong with the 3 or 4 emails that obviously triggered the problem; to me they seemed perfectly fine, without any special characters or whatever -- actually, one of them was a booking hotel confirmation such as I had many others in the folder.
Comment 57•5 years ago
|
||
This is happening to me on TB 78.3.1 (on linux) with all my gmail accounts on two different computers. Does anyone have an idea what I could do to help get to the base of this problem? Whenever I start TB, I am told taht messages I have deleted can be purged from disk, saving 1 TB of data. Then every time I click on any of my gmail Inboxes, it starts Downloading message 1 of some ten thousand and I cannot open any emails until it is finished. This is maddening.
Comment 58•5 years ago
|
||
Stan, Do you allow "purged from disk" to occur? What is the exact message you see here. I'm thinking this is actually to "compact" folders that have messages that have been deleted but not sure.
Are you storing gmail message for offline use or are you just letting tb keep the headers locally. You can tell this by right-click on Inbox and select Properties and then Synchronization. Is "Select this folder for offline use" checked or not?
If you could record an IMAP:5 log it may help show why you are seeing the re-downloads. The instructions for recording the log are here: https://wiki.mozilla.org/MailNews:Logging. You can attach the log above. Just be sure that while recording the log that the problem actually occurs and explain in the comment exactly what you were doing while recording the log.
Comment 59•5 years ago
|
||
Hi gene smith,
Thanks for your response and sorry for taking so long. After seeing your response, I played around with the synchronization settings and clicked on "Keep messages on all folders on this computer", which filled up my hard drive over night. Luckily it could be undone by de-activating that option, so I keep messages on selected folders only. However, TB re-starts downloading all messages again episodically. Now I clicked on "Sent mail" of a different gmail account and it is "Downloading message 9345 of 345" with numbers rising. Something is seriously wrong. Often, when I want to view an email, it starts "Downloading message..." and take forever without showing anything. It's infuriating.
"Select this folder for offline use" is ticked for each of these folders.
I ran a log, which became very large in no time, so I cannot post it here. I have a a few different imap accounts, but see the below "HasNoChildren" pattern repeatedly only for gmail:
2020-11-28 10:17:33.945302 UTC - [(null) 2449859: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-28 10:17:33.945299 UTC - [(null) 2449859: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-28 10:17:33.945310 UTC - [(null) 2449859: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=0x7f3f2824c940 nb=51 needmore=0]
2020-11-28 10:17:33.945313 UTC - [(null) 2449859: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=0x7f3f22eed7c0 nb=56 needmore=0]
2020-11-28 10:17:33.945317 UTC - [(null) 2449859: IMAP]: I/IMAP 0x7f3f21ecb000:imap.gmail.com:A:CreateNewLineFromSocket: * XLIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"
Is there something particular I should search for in the log file?
Comment 60•5 years ago
•
|
||
important |
The "has no children" just means the folder, e.g., Sent, has no sub-folders under it. Not a problem.
Did it really fill up your drive completely? If so, you must have a lot of email or a just a small drive.
Anyhow, just unchecking the setting usually doesn't get rid of the messages downloaded. It just stops more messages from being saved. If you want to get rid of the message that have been downloaded after disabling local storage you have to either "repair" the folder (right click, click repair button) or, with tb shutdown, go into the profile under ImapMail and delete the appropriate mbox files (files with just a name and no .msf extension). Then on tb restart, the folders with missing mbox files, if configured for local storage, will be downloaded when accessed. You could also delete both files, e.g., Sent and Sent.msf and tb will bring in clean data for both headers (the .msf) and message bodies (only if configured for local storage) to the mbox file.
If repairing or deleting doesn't help another more drastic solution might be just to clean out all the files under your problem gmail account and let tb bring everything back from gmail server cleanly. Here's what I would do:
For the account(s) you want to fully repair, under server setting uncheck "Get new mail at startup" and "Check mail every X min". Also, see note below regarding global search.
For the problem account, go to "Account Settings" then "Synchronization and Storage"
Uncheck "Keep message for in all folders ... on this computer"
Click "Advanced" button and in the account you are trying to fix, choose specifically which folder to keep messages locally.
Note: All Mail is usually very large since it contains "all mail". Definitely a candidate to not store locally. You might also consider just not subscribing to "All Mail" so it is not accessed by tb at all
Click OK for the "advanced" locally stored messages selection
Shutdown tb
With file mgr or cmd line, go to your profile like ~/.thunderbird/akfafas.default/ImapMail/<account name>
Delete everything under <account name>
Note: This should all come back when you restart tb, but you can back this up before deleting if you are paranoid.
Restart tb and select/click Inbox on the account. The other folder will appears.
Only headers will download except for folders you have chosen to store locally.
Once all is downloaded (of course may take some time) re-enable the setting turned off in step 1.
An even more drastic fix would be to just set up a new profile (start tb with -p option I think) and let account mgr help you create the accounts again from scratch. But if doing this you want to go into the "advanced" setting of the wizard so the tb doesn't use the default setting of storing all messages locally.
Note: I have 2 gmail accounts I keep active for test purposes mostly and never see a problem.
Note also that global search is enabled by default, so when you download new stuff to tb, background indexing may occur for some time making tb use a lot of cpu. You may also see full messages downloaded but not saved to mbox files. So you might consider turning it off as part of step 1 above under General preferences Indexing uncheck "Enable global search and indexing".
Comment 61•5 years ago
|
||
Wow, thanks a lot for the detailed guide! I really appreciate your time. I will try what you said and report back. Yes, I figured that "All mail" is not what one might want to sync. :-) It's weird, after running over night, I got a "disk almost full" warning, so I removed the "All mail" setting and reverted to my original settings and when I next checked, the TB profile was of a normal size again (mind you, 20 GB). But I hadn't checked its size when I got the "disk almost full" message.
Anyway, will try to clean up one account at a time as you suggested and re-download and see if this helps.
Comment 62•5 years ago
|
||
Right-click on folders for which TB kept re-downloading messages, then Properties -> Repair Folder really did the trick! I did not need to delete the mailboxes and re-download after all. A very big THANK YOU again!
Comment 63•5 years ago
|
||
Ok, good to know that fixed it. I'll go ahead and close this as FIXED since you did fix the the problem. Usually we close this type of issue as INVALID but I do think it is a valid issue but determining the exact cause without direct access to your tb setup is very difficult.
Comment 64•5 years ago
|
||
Moving to WFM (FIXED will mess up uplift queries and such, so we only use it when there's a patch).
Description
•